#include <bits/stdc++.h>
using namespace std ;
const int MAXN = 1e5 + 10 ;
long long n , hlen , cnt;
long long a [MAXN] , hash_n [MAXN] , mp[MAXN] ;
vector <int > h ;
int main ()
{
    freopen ("duel.in" , "r" , stdin) ;
    freopen ("duel.out" , "w" , stdout) ;
    cin >> n ;
    for (int i = 1;i <= n;++ i)
    {
        cin >> a[i] ;
        hash_n[a[i]]++ ;
        if (mp[a[i]] == true) continue ;
        mp[a[i]] = true ;
        h.push_back (a[i]) ;
    }
    sort (h.begin () , h.end ()) ;
    hlen = h.size () ;
    for (int i = 0;i < hlen;++ i)
    {
        int hi = h[i] , nowh = hash_n[hi] ;
        if (cnt <= nowh) cnt = 0 ;
        else cnt -= nowh ;
        cnt += hash_n[hi] ;
    }
    cout << cnt << endl ;
    return 0 ;
}
